using Aurora.TaskScheduler.Abstractions.Message;
using Gateway.Infrastructure.AutoDI;

namespace Gateway.IApplication.TaskScheduler;
/// <summary>
/// task scheduler app
/// </summary>
public interface ITaskSchedulerApp : IDependency
{
    /// <summary>
    /// 
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    Task<string> Add(AppTask input);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>

    Task<bool> Update(AppTask input);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<bool> Remove(string id);


    /// <summary>
    /// 暂停
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<bool> Pause(string id);
    /// <summary>
    /// 重启任务
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<bool> Resume(string id);
    /// <summary>
    /// 运行任务
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<bool> Run(string id);
}